/**
 * @ author: 汪孟苹
 */
define(['jquery','template','bch/app/selfRecord/selfRecordComm.servers','bch/template/selfRecord/selfRecordComm.tpl'],function($,template,$servers,tpl){
	var ui = {};

	var drawTab = function(data){
		return template("selfRecordComm_tab",data);
	}
	var drawTable = function(data){
		return template("selfRecordComm_table",data);
	}

	ui.tab = function(options){
		$("#" + options.id).html(tpl.tab());
		var h = drawTab(options);
		$("#" + options.id).html(h);
	}
	ui.table = function(options){
		$("#" + options.id).html(tpl.table());
		var h = drawTable(options.data);
		$("#" + options.id).html(h);
	}

	return ui;
});